package entity

import (
	"time"
)

type TrainSeat struct {
	RoleID    int32 `gorm:"type:int;primary_key;not null"`
	Seat      int32 `gorm:"type:int;primary_key;not null"`
	CaptainID int32 `gorm:"not null"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (t *TrainSeat) Train(captainID int32) {
	t.CaptainID = captainID
}

func (t *TrainSeat) TrainFinish() {
	t.CaptainID = 0
}
